#!/usr/bin/make -f
%:
	dh $@ --with python3

override_dh_auto_configure:
	dh_auto_configure -- \
		-DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_LIBRARY_ARCHITECTURE="$(DEB_TARGET_MULTIARCH)" \
		-DGR_PYTHON_DIR=/usr/lib/python3/dist-packages \
		-DNATIVE_OPTIMIZATIONS=OFF

# FIXME: Override the home so that Python QA tests don't fail due to not being
# able to create the .gnuradio directory within the home dir. Ideally, the tests
# should not write to the home dir at all, so fix this in the future.
override_dh_auto_test:
	mkdir -p /tmp/debian/gr-test-home
	HOME=/tmp/debian/gr-test-home dh_auto_test
	rm -rf /tmp/debian/gr-test-home
